<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

class CreateEventTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('event', function (Blueprint $table) {

            $table->bigIncrements('id');
            $table->string('name',32)->comment('事件名称')->nullable(false);
            $table->string('created_by', 32)->comment('创建人');
            $table->string('receiver', 32)->comment('接收人');
            $table->string('class','32')->comment('所在班级');
            $table->integer('deathline')->comment('提交截止时间');
            $table->integer('start_submit_at')->comment('开始提交时间');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('event');
    }
}
